[all:vars]
ansible_user=student{{ item }}
ansible_password={{ admin_password }}
{% if ssh_port is defined %}
ansible_port={{ ssh_port }}
{% endif %}
ansible_python_interpreter=/usr/bin/python3

[lb]
{% for vm in f5_node_facts.instances %}
{% if 'student' + item == vm.tags.Student %}
f5 ansible_host={{ vm.public_ip_address }} ansible_user=admin private_ip={{ vm.private_ip_address }} ansible_password={{admin_password}} server_port=8443
{% endif %}
{% endfor %}

[control]
{% for vm in ansible_node_facts.instances %}
{% if 'student' + item == vm.tags.Student %}
ansible ansible_host={{ vm.public_ip_address }} ansible_user={{ vm.tags.username }} private_ip={{ vm.private_ip_address }}
{% endif %}
{% endfor %}




[web]
{% for vm in f5_node1_node_facts.instances %}
{% if 'student' + item == vm.tags.Student %}
{{ vm.tags.short_name }} ansible_host={{ vm.public_ip_address }} ansible_user={{ vm.tags.username }} private_ip={{ vm.private_ip_address }}
{% endif %}
{% endfor %}
{% for vm in f5_node2_node_facts.instances %}
{% if 'student' + item == vm.tags.Student %}
{{ vm.tags.short_name }} ansible_host={{ vm.public_ip_address }} ansible_user={{ vm.tags.username }} private_ip={{ vm.private_ip_address }}
{% endif %}
{% endfor %}
